package com.example.demo;


import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

public class RedisDemo {
    public static void main(String[] args) {
        JedisPool jedisPool=new JedisPool("tcp://127.0.0.1:8888");

        try(Jedis jedis=jedisPool.getResource()){
            //redis 的各种命令就对应Jedis的各种命令
            String pong=jedis.ping();
            System.out.println(pong);
        }
    }
}
